package com.ace.config.sample;

import com.ace.bean.BraveKnight;
import com.ace.bean.DragonSlayQuest;
import com.ace.bean.imp.Knight;
import com.ace.bean.imp.Quest;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by com.ace on 2018/3/8.
 */
@Configuration
public class KnightConfig {
    @Bean
    public Knight knight(){
        System.out.println("自动注入BraveKnight");
        return new BraveKnight();
    }

    @Bean
    public Quest quest(){
        System.out.println("自动注入DragonSlayQuest");
        return new DragonSlayQuest();
    }
}
